<template>
    <div class="WebMapTileServiceImageryProvider">
        <cesium-viewer @viewerAlready="viewerAlready">
        </cesium-viewer>
    </div>
</template>

<script>
    import CesiumViewer from "../../CesiumViewer";
    import {addAdditionalLayerOption} from "../../../utils/layersHandler";
    export default {
        name: "WebMapTileServiceImageryProvider",
        //import引入的组件需要注入到对象中才能使用",
        components: { CesiumViewer},
        data() {
            //这里存放数据",
            return {}
        },
        //方法集合",
        methods: {
            viewerAlready() {
                addAdditionalLayerOption(
                    "WebMapTileServiceImageryProvider",
                    new Cesium.WebMapTileServiceImageryProvider({
                        url : 'http://basemap.nationalmap.gov/arcgis/rest/services/USGSShadedReliefOnly/MapServer/WMTS/tile/1.0.0/USGSShadedReliefOnly/{Style}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}.jpg',
                        layer : 'USGSShadedReliefOnly',
                        style : 'default',
                        format : 'image/jpeg',
                        tileMatrixSetID : 'default028mm',
                        maximumLevel: 19,
                        credit : new Cesium.Credit('U. S. Geological Survey')
                    })
                )
            }
        }
    }
</script>

